package com.jyb.qiyefuwu.api.service;

import com.jyb.qiyefuwu.entity.ApplyForPaymentEntity;
import com.jyb.qiyefuwu.entity.DatabaseListEntiy;
import com.jyb.qiyefuwu.entity.DepartmentEntity;
import com.jyb.qiyefuwu.entity.FollowServiceEntity;
import com.jyb.qiyefuwu.entity.IntellDataListItem;
import com.jyb.qiyefuwu.entity.MakeOverOrderEntity;
import com.jyb.qiyefuwu.entity.NecessaryEntity;
import com.jyb.qiyefuwu.entity.NeedFollowListBean;
import com.jyb.qiyefuwu.entity.OderDetailsEntity;
import com.jyb.qiyefuwu.entity.ServiceNodeBean;
import com.jyb.qiyefuwu.entity.ServiceOderContactsBean;
import com.jyb.qiyefuwu.entity.ServiceOderInvoiceBean;
import com.sgb.net.entity.BaseEntity;
import com.sgb.net.entity.ListResponse;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Url;

public interface UserCenterApi {
    /**
     * 智能关注需求列表
     *
     * @param map
     * @return
     */
    @POST("v1/app/enterpriseServices/demandHall/getDemandHallListXQ")
    Call<BaseEntity<ListResponse<List<NeedFollowListBean>>>> getDemandHallListXQ(@Body Map map);

    /**
     * 关注取消关注
     *
     * @param map
     * @return
     */
    @POST("v1/app/enterpriseServices/serviceHall/saveAttention")
    Call<BaseEntity<String>> saveAttention(@Body Map<String, Object> map);

    /**
     * 智能关注商标列表
     */
    @POST("v1/app/enterpriseServices/trademark/pageListZC")
    Call<BaseEntity<ListResponse<List<IntellDataListItem>>>> getTradMarkList(@Body Map map);

    /**
     * 智能关注专利列表
     */
    @POST("v1/app/enterpriseServices/patent/pageListZC")
    Call<BaseEntity<ListResponse<List<IntellDataListItem>>>> getPantList(@Body Map map);

    /**
     * 智能关注版权列表
     */
    @POST("v1/app/enterpriseServices/copyright/pageListZC")
    Call<BaseEntity<ListResponse<List<IntellDataListItem>>>> getcopyrightList(@Body Map map);

    /**
     * 智能关注服务列表
     */
    @POST("v1/app/enterpriseServices/serviceHall/getServiceHallListFW")
    Call<BaseEntity<ListResponse<List<FollowServiceEntity>>>> getServiceList(@Body Map map);

    /**
     * 商标订单详情
     */
    @GET("v1/app/enterpriseServices/order/info/tradeMark")
    Call<BaseEntity<OderDetailsEntity>> tradeMark(@Query("orderId") String orderId, @Query("buyOrSeller") int buyOrSeller);

    /**
     * 专利订单详情
     */
    @GET("v1/app/enterpriseServices/order/info/patent")
    Call<BaseEntity<OderDetailsEntity>> patent(@Query("orderId") String orderId, @Query("buyOrSeller") int buyOrSeller);

    /**
     * 版权订单详情
     */
    @GET("v1/app/enterpriseServices/order/info/copyrigh")
    Call<BaseEntity<OderDetailsEntity>> copyrigh(@Query("orderId") String orderId, @Query("buyOrSeller") int buyOrSeller);


    /**
     * 知产订单列表--商标
     */
    @POST("v1/app/enterpriseServices/order/list/tradeMark/personal")
    Call<BaseEntity<ListResponse<List<MakeOverOrderEntity>>>> gettradeMarkOrderList(@Body Map map);

    /**
     * 知产订单列表--专利
     */
    @POST("v1/app/enterpriseServices/order/list/patent/personal")
    Call<BaseEntity<ListResponse<List<MakeOverOrderEntity>>>> getpatentOrderList(@Body Map map);

    /**
     * 知产订单列表--版权
     */
    @POST("v1/app/enterpriseServices/order/list/copyright/personal")
    Call<BaseEntity<ListResponse<List<MakeOverOrderEntity>>>> getcopyrightOrderList(@Body Map map);

    /**
     * 订单详情切换联系人
     */
    @POST("v1/app/enterpriseServices/order/info/updateContact")
    Call<BaseEntity> saveOrUpdate(@Body ServiceOderContactsBean data);

    /**
     * 订单详情选择开票信息
     */
    @POST("v1/app/enterpriseServices/order/info/billingInformation")
    Call<BaseEntity> billingInformation(@Body ServiceOderInvoiceBean data);

    /**
     * 修改备注
     */
    @GET("v1/app/enterpriseServices/order/info/updateNote")
    Call<BaseEntity> updateNote(@Query("orderId") String orderId, @Query("note") String note);

    /**
     * 订单流程
     */
    @GET("v1/app/enterpriseServices/order/process")
    Call<BaseEntity<List<ServiceNodeBean>>> process(@Query("orderId") String orderId);

    /**
     * 知产销售采购订单--关闭订单
     */
    @GET("v1/app/enterpriseServices/order/closing")
    Call<BaseEntity> orderclosing(@Query("closingNo") String closingno, @Query("orderId") String orderid, @Query("reason") String reason,@Query("buyerOrSeller") int buyerOrSeller);


    /**
     * 知产销售采购订单--删除订单
     * v1/app/enterpriseServices/order/{id}/{buyOrSeller}
     * id为订单id,buyOrSeller为订单类型
     */
    @DELETE
    Call<BaseEntity> DeleteOrder(@Url String url);


    /**
     * 知产销售采购订单--确认接单
     */
    @GET("v1/app/enterpriseServices/order/receiving")
    Call<BaseEntity> ConFrimOrder(@Query("orderId") String orderId, @Query("takeOrderNo") String takeOrderNo);

    /**
     * 资料库列表
     *
     * @param limit
     * @param orderId     订单id
     * @param page
     * @param sourceIndex 买卖方标识 0买方 1卖方
     * @return
     */
    @GET("tbOrderData/list")
    Call<BaseEntity<ListResponse<List<DatabaseListEntiy>>>> databaseList(@Query("limit") int limit, @Query("orderId") String orderId, @Query("page") int page, @Query("sourceIndex") int sourceIndex);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    @GET("tbOrderData/del")
    Call<BaseEntity> delDatabase(@Query("id") int id);

    /**
     * 采购订单-待付款-获取公司是否需要审批
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/whether")
    Call<BaseEntity> getCompanyType(@Body Map map);

    /**
     * 采购订单-待付款-获取公司审批状态
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/status")
    Call<BaseEntity<String>> getApproveStatus(@Body Map map);

    /**
     * 获取部门
     */
    @GET
    Call<BaseEntity<List<DepartmentEntity<List<DepartmentEntity>>>>> getOrganizationByCompany(@Url String url);

    /**
     * 待付款-生成待付订单-公司团队-不需要审批
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/company/unnecessary")
    Call<BaseEntity> createPayOrder(@Body Map map);

    /**
     * 生成待付订单-个人
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/personal")
    Call<BaseEntity<String>> createPayOrderforUser(@Body Map map);

    /**
     * 待付款-申请付款-发起审批
     *
     * @return
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/initiate")
    Call<BaseEntity> applyForPayment(@Body ApplyForPaymentEntity data);

    /**
     * 待付款-生成待付订单-公司团队-需要审批-（发起审批成功后调用）
     *
     * @return
     */
    @POST("v1/app/enterpriseServices/order/payment/apply/company/necessary")
    Call<BaseEntity> necessary(@Body NecessaryEntity data);

    /**
     * 凭证信息列表
     *
     * @param limit
     * @param orderId 订单id
     * @param page
     * @return
     */
    @GET("tbOrderCredentials/list")
    Call<BaseEntity<ListResponse<List<DatabaseListEntiy>>>> voucherList(@Query("limit") int limit, @Query("orderId") String orderId, @Query("page") int page);

    /**
     * 删除凭证
     *
     * @param id
     * @return
     */
    @GET("tbOrderCredentials/del")
    Call<BaseEntity> delVoucher(@Query("id") int id);



    /**
     * 提交凭证
     *
     * @param orderId
     * @return
     */
    @GET("tbOrderCredentials/confirm/submit")
    Call<BaseEntity> submitVoucher(@Query("orderId") String orderId);

    /**
     * 开票信息列表
     *
     * @param limit
     * @param orderId     订单id
     * @param page
     * @return
     */
    @GET("tbOrderInvoice/list")
    Call<BaseEntity<ListResponse<List<DatabaseListEntiy>>>> billingList(@Query("limit") int limit, @Query("orderId") String orderId, @Query("page") int page);

    /**
     * 删除开票信息
     *
     * @param id
     * @return
     */
    @GET("tbOrderInvoice/del")
    Call<BaseEntity> delBilling(@Query("id") int id);


    /**
     * 买方确认完成
     */
    @GET("v1/app/enterpriseServices/order/confirm/complete")
    Call<BaseEntity> confirmOrdercomplete(@Query("orderId") String id);
    /**
     * 事实获取当前订单状态
     */
    @GET("v1/app/enterpriseServices/order/order/status")
    Call<BaseEntity> getOrderStatus(@Query("orderId") String orderId,@Query("companyId") String companyId,@Query("type") String type );

}
